home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / JAVA_ALL / IDE / SUBARTIC / SUB_ARCT / INPUT / GROW_DRA.JAV < prev    next >
Encoding:
Text File  |  1996-10-04  |  3.8 KB  |  97 lines

  1.  
  2. package sub_arctic.input;
  3.  
  4. import sub_arctic.lib.interactor;
  5.  
  6. /** 
  7.  * Input protocol for objects wishing to receive drag input suitable for 
  8.  * resizing.  
  9.  *
  10.  * @see sub_arctic.input.grow_drag_focus_agent
  11.  * @author Scott Hudson
  12.  */
  13. public interface grow_draggable extends focusable, interactor {
  14.  
  15.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  16.  
  17.   /** 
  18.    * Dispatch the start of a grow-drag to the object (intended to change its
  19.    * size).  Returns true if the drag is accepted (and hence the event 
  20.    * consumed).  The event retains the original raw coordinate values (in 
  21.    * the local coordinates of the object receiving the drag).
  22.    *
  23.    * @param evt the event "causing" the drag
  24.    * @param user_info the information object associated with the drag
  25.    * @return boolean indicating whether the input was consumed/accepted
  26.    */
  27.   public boolean drag_start(event evt, Object user_info);
  28.  
  29.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  30.  
  31.   /** 
  32.    * Dispatch movement during a grow-drag to the object (intended to change 
  33.    * its size).  Returns true if the drag is accepted (and hence the event 
  34.    * consumed).  The event retains the original raw coordinate values (in 
  35.    * the local coordinates of the object receiving the drag).  Both the 
  36.    * original and new sizes are provided as well.
  37.    *
  38.    * @param evt the event "causing" the movement
  39.    * @param cur_w the current width of the object (based on movement from the 
  40.    *              first drag point)
  41.    * @param cur_h the current height of the object (based on movement from the 
  42.    *              first drag point)
  43.    * @param start_w the original width of the object
  44.    * @param start_h the original height of the object
  45.    * @param user_info the information object associated with the drag
  46.    * @return boolean indicating whether the input was consumed/accepted
  47.    */
  48.   public boolean drag_feedback(
  49.     event evt,     
  50.     int cur_w, int cur_h,
  51.     int start_w, int start_h,
  52.     Object user_info);
  53.  
  54.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  55.  
  56.   /** 
  57.    * Dispatch movement during a grow-drag to the object (intended to change 
  58.    * its size).  Returns true if the drag is accepted (and hence the event 
  59.    * consumed).  The event retains the original raw coordinate values (in 
  60.    * the local coordinates of the object receiving the drag).  Both the 
  61.    * original and new sizes are provided as well.
  62.    *
  63.    * @param evt the event "causing" the movement
  64.    * @param cur_w the current width of the object (based on movement from the 
  65.    *              first drag point)
  66.    * @param cur_h the current height of the object (based on movement from the 
  67.    *              first drag point)
  68.    * @param start_w the original width of the object
  69.    * @param start_h the original height of the object
  70.    * @param user_info the information object associated with the drag
  71.    * @return boolean indicating whether the input was consumed/accepted
  72.    */
  73.   public boolean drag_end(
  74.     event evt,     
  75.     int cur_w, int cur_h,
  76.     int start_w, int start_h,
  77.     Object user_info);
  78.  
  79.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  80. }
  81. /*=========================== COPYRIGHT NOTICE ===========================
  82.  
  83. This file is part of the subArctic user interface toolkit.
  84.  
  85. Copyright (c) 1996 Scott Hudson and Ian Smith
  86. All rights reserved.
  87.  
  88. The subArctic system is freely available for most uses under the terms
  89. and conditions described in 
  90.   http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html 
  91. and appearing in full in the lib/interactor.java source file.
  92.  
  93. The current release and additional information about this software can be 
  94. found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
  95.  
  96. ========================================================================*/
  97.